import Https from '@/utils/https'

// 获取离线同步任务统计信息
const statistics = (params) => Https.get('/api/v1/integration/offline/statistics', params)
// 发布任务
const online = (params) => Https.get('/api/v1/integration/offline/online', params, { needCode: true })
// 下线任务
const offline = (params) => Https.get('/api/v1/integration/offline/offline', params, { needCode: true })
// 删除任务
const deleteOffline = (params) => Https.get('/api/v1/integration/offline/delete', params, { needCode: true })
// 重跑
const runOffline = (params) => Https.get('/api/v1/integration/offline/run', params, { needCode: true })

const getDirList = (params) => Https.get('/api/v1/integration/offline/getDirList', params, { needCode: true })

const upsetDir = (params) => Https.post('/api/v1/integration/offline/upsetDir', params, { needCode: true })

const deleteDir = (params) => Https.get('/api/v1/integration/offline/deleteDir', params, { needCode: true })

const offlineLog = (params) => Https.get('/api/v1/integration/offline/log', params, { needCode: true })

// 查询用户信息列表
const queryUserListReq = (params) => Https.get('/api/v1/integration/offline/operation/userList', params)

export {
  statistics, online, offline, deleteOffline, runOffline, getDirList, upsetDir, deleteDir, offlineLog, queryUserListReq,
}
